package cn.usian.service.employeeserviceimpl;

import cn.usian.common.R;
import cn.usian.dao.DishFlavorMapper;
import cn.usian.entity.Dish;
import cn.usian.entity.DishFlavor;
import cn.usian.exception.NameException;
import cn.usian.service.DishFlavorService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;

@Service
public class DishFlavorServiceImpl implements DishFlavorService {
    @Resource
    private DishFlavorMapper dishFlavorMapper;


    @Override
    public R adddishFlavor(DishFlavor dishFlavor) {
        dishFlavor.setCreateTime(LocalDateTime.now());
        dishFlavor.setUpdateTime(LocalDateTime.now());
        return R.success(dishFlavorMapper.insert(dishFlavor));
    }
}
